<%@ page contentType="text/html; charset=utf-8" language="java"  errorPage="" %>
<%@page import="offer.SessionObj"%>
<%@page import="system.bean.Member"%>
<%@page import="java.util.ArrayList"%>
<%@page import="system.bean.AuditModule"%>
<%@page import="system.bean.AuditModuleItem"%>
<%@page import="offer.system.GetMemberSource"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
//Session ModuleStatus control
SessionObj sessionObj = (SessionObj)request.getSession().getAttribute("sessionObj");
AuditModule auditModule = (AuditModule)request.getAttribute("auditModule");
AuditModuleItem qaItem  = (AuditModuleItem)request.getAttribute("QaItem");
ArrayList<AuditModuleItem> SignItemList = null;
if(null != request.getAttribute("SignItemList")){
	SignItemList =(ArrayList<AuditModuleItem>)request.getAttribute("SignItemList");
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QA Audit</title>
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/index.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/items.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/subItems.css" />
    <script type="text/javascript"  src="<%=basePath%>jstree-v.pre1.0/_lib/jquery.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/coverLayer.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/StringUtil.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/QaAudit.js"></script>
</head>

<body class="body" >
<script type="text/javascript">
   function bodyLoad(){
   
   }
   $(document).ready(function(){
        $("#submitButton").click(function(){
	 	     $(":input").css("border-color","");
		     if($("#qa_audit_result").val().trim().length == 0){
		        $("#qa_audit_result").css("border-color","red");
		        alert("审核结果 不能为空！");
		        return;
		     }
		    document.getElementById("QaAuditForm").submit(); 
		});
   });
 	
</script>
 <div id="" class="tableContent" >
 <!-- ****************************************************************************************************** -->
   	  <div class="itemTitle">
	        QA审核结果   <span style="font-size:12px;color:#DDD">注：只要有一个审核人员审核通过，就算最终审核通过！</span>
	  </div>
	  <input type="hidden"  id="singMemberIds" name="singMemberIds" value=""  />
	  <div class="itemDiv" >
	     <span class="textSpan">&nbsp;审核结果:</span>
	     <div style ="height:30px; background:#FFF;padding:5px; margin:0px 20px; font-weight:bold;color:#F00;font-size:14px; ">
	     <% if(qaItem.getResult().equalsIgnoreCase("0")) { %>
	         未通过
	     <% }else{ %>
	         通过
	     <% } %>
	     </div>
	  </div>
	  <div class="itemDiv">
	   		<span class="textSpan">&nbsp;审核意见:</span><br/>
	   		<div style ="height:50px; background:#FFF;padding:5px; margin:0px 20px; font-weight:bold;color:#000;font-size:14px; ">
	    	 <%=qaItem.getComment() %>
	    	</div>
	  </div>
	  <div class="itemDiv">
	   		<span class="textSpan">&nbsp;QA审核时间:</span>
	   		<%= qaItem.getAduitTime() %>
	  </div> 
	  <%if( null != SignItemList){ %>
	  <div class="itemTitle">
	       会签审核结果 <span style="font-size:12px;color:#555">注：所有人员都审核通过，才能算最终审核通过！</span>
	  </div>
	  <% Member member = null;
	     AuditModuleItem signItem = null;
	     for(int i = 0 ; i < SignItemList.size() ; i++){
	         signItem = SignItemList.get(i);
	  	     member = GetMemberSource.getMemberById(signItem.getMemberId());
	   %>  
	     <div class="itemDiv">
	   		<span class="textSpan">&nbsp;审核人:</span><%=member.getReal_name() %><%=member.getEmpNo() %><br/>
	   		<div style =" background:#FFF;padding:5px; margin:10px 20px; font-weight:bold;color:#000;font-size:14px; border:dotted 1px #666; ">
	    	    <%if(signItem.getIsAudited().equalsIgnoreCase("0")){ %>
	    	    	未审核
	    	    <%}else{ %>
	    	    	审核结果：<span style="color:#F00"><%=signItem.getResult().equalsIgnoreCase("1")?"通过":"不通过" %></span><br/>
	    	    	审核时间：<%=signItem.getAduitTime() %><br/>
	    	    	-------------------------------------------------------<br/>
	    	    	<%=signItem.getComment() %>
	    	    <%} %>
	    	</div>
	  	</div>
	  <%} %>
	  <%} %>
   <div id="submitContent" class="submitContent">
     
     <span id="opNoticeSpan" style="color:red;" ></span>
     <span class="textSpan">&nbsp;</span>
  </div>
 <!-- ****************************************************************************************************** -->
 </div>
 <div id="coverDiv" class="coverDiv"></div> <!-- 覆盖层，要放在所有弹出层之前 -->
 <!-- =================================================提交QA审核结果 Begin========================================================= -->
 
 <div id="submitQaAuditResultDiv" class="AMContainer">
    <div id="addItem_title" style="border-bottom:1px solid #666;margin-bottom:8px;">
        <div id="Audit_title" style="float:left; font-weight:bold;">添加会签审核人员 </div>
        <div style="float:right;">
            <a href="javascript:void(0);" id="QaAuditResult_close" title="close">close</a>
        </div>
        <div style="clear:both" ></div>
    </div>
   	<div  style=" padding:5px;border:1px solid #EAEAEA; margin:5px; color:red;font-weight:bold;"  >
   		<div id="SignmembersListDiv" style="margin:0px;overflow:auto;max-height:120px;border:1px;border-color:#666;color:#000;font-size:14px;">
   		   
   		</div>
	</div>
   	<div id="AuditOption" class="submitContainer">
   	   <input type="button" value="确定" onclick="addSignMembers()" /> &nbsp;
   	   <input type="button" value="取消" onclick="hiddenAuditResultDiv()"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</div>
 </div>
 
 <!-- =================================================提交QA审核结果 END=========================================================== -->
 
</body>
</html>